<?php
/**
 * Another Portal
 *
 * @file ./ap_source/configuration.php
 * @author AnotherPortal Team
 * @copyright AnotherPortal.org
 *
 * @version 1.0.0
 */

if (!defined('SMF'))
	die('Hacking attempt...');

function ap__adminInit()
{

	// Load our template.
	loadTemplate('ap_templates/admin/configuration');

	// Globals.
	global $context, $txt;

	// Our Admin Tab...
	$context[$context['admin_menu_name']]['tab_data'] = array(
		'title' => $txt['ap_settings'],
		'description' => $txt['ap_general_desc'],
		'tabs' => array(
			'general' => array(
			)
		)
	);

	// Page Title & Sub-Template.
	$context += array(
		'page_title' => $txt['ap_general'] . ' ' . $txt['ap_settings'],
		'sub_template' => 'ap_general_settings'
	);

	// Hack our base linktree item in.
	$first_three = array_slice($context['linktree'], 0, 2, true);
	$first_three[] = array(
		// 'url' => $scripturl . '?action=admin;area=another_portal;sa=about', # Eventually, tie this in to an about page.
		'name' => $txt['another_portal_title']
	);
	$last_items = array_slice($context['linktree'], 2, count($context['linktree']) - 2, true);
	$context['linktree'] = array_merge($first_three, $last_items);

}